WOLF core
WOLF: A Modular Estimation Framework for Robotics
XXXXXXXXXXXXXXXXXXXXXXXXvoid(0)" frameborder="0" name="MSearchResults" id="MSearchResults">
wolf::FactorRelativePosition2d Class Reference

#include <core/factor/factor_relative_position_2d.h>

Inheritance diagram for wolf::FactorRelativePosition2d:
[legend]

Public Member Functions

 FactorRelativePosition2d (const Eigen::VectorXd &_measurement, const Eigen::MatrixXd &_measurement_sqrt_information_upper, const NodeStateBlocksPtr &_node_reference, const NodeStateBlocksPtr &_node_target, const ProcessorBasePtr &_processor_ptr, bool _apply_loss_function, const FactorTopology &_top, FactorStatus _status=FAC_ACTIVE)
 Constructor of category FAC_FRAME. More...
 
 ~FactorRelativePosition2d () override=default
 
unsigned int getSize () const override
 Returns the factor residual size. More...
 
Eigen::VectorXd evaluateResiduals (const std::vector< Eigen::Map< const Eigen::VectorXd > > &_st_vector) const override
 Returns the residual evaluated in the states provided. More...
 
void evaluateJacobians (const std::vector< Eigen::Map< const Eigen::VectorXd > > &_st_vector, std::vector< Eigen::Map< Eigen::MatrixRowXd > > &jacobians, const std::vector< bool > &_compute_jacobian) const override
 Returns the jacobians evaluated in the states provided. More...
 
void evaluateJacobians (const std::vector< Eigen::Map< const Eigen::VectorXd > > &_st_vector, std::vector< Eigen::MatrixXd > &jacobians, const std::vector< bool > &_compute_jacobian) const override
 
void evaluateUnweightedJacobians (std::vector< Eigen::MatrixXd > &jacobians) const override
 Returns the pure jacobians (without measurement noise) evaluated in the state blocks values. More...
 
- Public Member Functions inherited from wolf::FactorAnalytic
 FactorAnalytic (const std::string &_type, const FactorTopology &_top, const Eigen::VectorXd &_measurement, const Eigen::MatrixXd &_measurement_sqrt_information_upper, const NodeStateBlocksPtrList &_node_state_block_list, const ProcessorBasePtr &_processor_ptr, const std::vector< StateBlockPtr > &_state_ptrs, bool _apply_loss_function, FactorStatus _status)
 
 ~FactorAnalytic () override=default
 
bool evaluate (double const *const *parameters, double *residuals, double **jacobians) const override
 Evaluate the factor given the input parameters and returning the residuals and jacobians. More...
 
bool evaluate (const std::vector< const double * > &_states_ptr, Eigen::VectorXd &_residual, std::vector< Eigen::MatrixXd > &_jacobians) const override
 
virtual Eigen::VectorXd evaluateResiduals (const std::vector< Eigen::Map< const Eigen::VectorXd > > &_st_vector) const =0
 Returns the residual evaluated in the states provided. More...
 
virtual void evaluateJacobians (const std::vector< Eigen::Map< const Eigen::VectorXd > > &_st_vector, std::vector< Eigen::Map< Eigen::MatrixRowXd > > &jacobians, const std::vector< bool > &_compute_jacobian) const =0
 Returns the normalized jacobians evaluated in the states. More...
 
virtual void evaluateJacobians (const std::vector< Eigen::Map< const Eigen::VectorXd > > &_st_vector, std::vector< Eigen::MatrixXd > &jacobians, const std::vector< bool > &_compute_jacobian) const =0
 
virtual void evaluateUnweightedJacobians (std::vector< Eigen::MatrixXd > &jacobians) const =0
 Returns the jacobians (without measurement noise normalization) evaluated in the current state blocks values. More...
 
- Public Member Functions inherited from wolf::FactorBase
 FactorBase (const std::string &_type, const FactorTopology &_top, const JacobianMethod &_jac_method, const Eigen::VectorXd &_measurement, const Eigen::MatrixXd &_measurement_sqrt_information_upper, const NodeStateBlocksPtrList &_node_state_block_list, const ProcessorBasePtr &_processor_ptr, const std::vector< StateBlockPtr > &_state_ptrs, bool _apply_loss_function, FactorStatus _status=FAC_ACTIVE)
 constructor from measurement and noise square root information upper matrix (cholesky) More...
 
 ~FactorBase () override=default
 
virtual void remove (bool viral_remove_parent_without_children=false)
 
bool hasChildren () const override
 
unsigned int id () const
 
virtual FactorTopology getTopology () const final
 get the main topological characteristic More...
 
virtual void getTopology (FactorTopology _top) final
 set the main topological characteristic More...
 
std::string getTopologyString () const
 get the main topological characteristic as string More...
 
virtual bool evaluate (double const *const *_parameters, double *_residuals, double **_jacobians) const =0
 Evaluate the factor given the input parameters and returning the residuals and jacobians. More...
 
virtual bool evaluate (const std::vector< const double * > &_states_ptr, Eigen::VectorXd &_residual, std::vector< Eigen::MatrixXd > &_jacobians) const =0
 
virtual Eigen::VectorXd residual () const
 Evaluate the factor residual with the current state block values. More...
 
virtual double cost () const
 Evaluate the cost of the factor with the current state block values. More...
 
virtual JacobianMethod getJacobianMethod () const final
 Returns the jacobians computation method. More...
 
virtual std::vector< StateBlockConstPtr > getStateBlockPtrVector () const
 Returns a vector of pointers to the states in which this factor depends. More...
 
virtual std::vector< StateBlockPtr > getStateBlockPtrVector ()
 
virtual std::vector< unsigned int > getStateSizes () const
 Returns a vector of the states sizes. More...
 
virtual const Eigen::VectorXd & getMeasurement () const
 Returns a reference to the measurement. More...
 
virtual const Eigen::MatrixXd & getMeasurementSquareRootInformationUpper () const
 Returns a reference to the measurement square root information. More...
 
FeatureBaseConstPtr getFeature () const
 Returns a pointer to the feature constrained from. More...
 
FeatureBasePtr getFeature ()
 
CaptureBaseConstPtr getCapture () const
 Returns a pointer to its capture. More...
 
CaptureBasePtr getCapture ()
 
FrameBaseConstPtr getFrame () const
 Returns a pointer to its frame. More...
 
FrameBasePtr getFrame ()
 
ProcessorBaseConstPtr getProcessor () const
 getProcessor More...
 
ProcessorBasePtr getProcessor ()
 
virtual unsigned int getSize () const =0
 Returns the factor residual size. More...
 
FactorStatus getStatus () const
 Gets the status. More...
 
void setStatus (FactorStatus _status)
 Sets the status. More...
 
bool getApplyLossFunction () const
 Gets the apply loss function flag. More...
 
NodeStateBlocksWPtrList getNodesFactored ()
 
FrameBaseWPtrList getFramesFactored ()
 
CaptureBaseWPtrList getCapturesFactored ()
 
LandmarkBaseWPtrList getLandmarksFactored ()
 
SensorBaseWPtrList getSensorsFactored ()
 
NodeStateBlocksConstWPtrList getNodesFactored () const
 
FrameBaseConstWPtrList getFramesFactored () const
 
CaptureBaseConstWPtrList getCapturesFactored () const
 
LandmarkBaseConstWPtrList getLandmarksFactored () const
 
SensorBaseConstWPtrList getSensorsFactored () const
 
bool hasNode (const NodeStateBlocksConstPtr &_nsb) const
 
bool hasFrame (const FrameBaseConstPtr &_frm) const
 
bool hasCapture (const CaptureBaseConstPtr &_cap) const
 
bool hasLandmark (const LandmarkBaseConstPtr &_lmk) const
 
bool hasSensor (const SensorBaseConstPtr &_sen) const
 
void link (FeatureBasePtr ftr)
 
virtual void printHeader (int _depth, bool _factored_by, bool _metric, bool _state_blocks, std::ostream &_stream, std::string _tabs="") const
 
void print (int _depth, bool _factored_by, bool _metric, bool _state_blocks, std::ostream &_stream=std::cout, std::string _tabs="") const
 
virtual CheckLog localCheck (bool _verbose, std::ostream &_stream, std::string _tabs="") const
 
bool check (CheckLog &_log, bool _verbose, std::ostream &_stream, std::string _tabs="") const
 
- Public Member Functions inherited from wolf::NodeBase
 NodeBase (const std::string &_category, const std::string &_type="Undefined", const std::string &_name="")
 
virtual ~NodeBase ()=default
 
unsigned int nodeId () const
 
std::string getCategory () const
 
std::string getType () const
 
std::string getName () const
 
bool isRemoving () const
 
virtual bool hasChildren () const =0
 
void setType (const std::string &_type)
 
void setName (const std::string &_name)
 
ProblemConstPtr getProblem () const
 
ProblemPtr getProblem ()
 

Additional Inherited Members

- Static Public Member Functions inherited from wolf::FactorBase
template<typename classType , typename... T>
static std::shared_ptr< classType > emplace (FeatureBasePtr _oth_ptr, T &&... all)
 
- Protected Member Functions inherited from wolf::FactorBase
void setProblem (ProblemPtr) override final
 
virtual void setProblem (ProblemPtr _prob_ptr)
 
- Protected Attributes inherited from wolf::FactorBase
unsigned int factor_id_
 
FactorTopology topology_
 topology of factor More...
 
JacobianMethod jacobian_method_
 jacobian method More...
 
FactorStatus status_
 status of factor More...
 
bool apply_loss_function_
 flag for applying loss function to this factor More...
 
Eigen::VectorXd measurement_
 the measurement vector More...
 
Eigen::MatrixXd measurement_sqrt_information_upper_
 the squared root information matrix More...
 
std::vector< unsigned int > state_block_sizes_
 vector containing sizes of the state blocks involved More...
 
std::vector< StateBlockPtr > state_block_vector_
 vector containing the state blocks involved More...
 
- Protected Attributes inherited from wolf::NodeBase
ProblemWPtr problem_ptr_
 
unsigned int node_id_
 Node id. It is unique over the whole Wolf Tree. More...
 
std::string node_category_
 Text label identifying the category of node ("SENSOR", "FEATURE", etc) More...
 
std::string node_type_
 Text label identifying the type or subcategory of node ("Pin Hole", "Point 2d", etc) More...
 
std::string node_name_
 
bool is_removing_
 A flag for safely removing nodes from the Wolf tree. See remove(). More...
 

Constructor & Destructor Documentation

◆ FactorRelativePosition2d()

wolf::FactorRelativePosition2d::FactorRelativePosition2d ( const Eigen::VectorXd &  _measurement,
const Eigen::MatrixXd &  _measurement_sqrt_information_upper,
const NodeStateBlocksPtr &  _node_reference,
const NodeStateBlocksPtr &  _node_target,
const ProcessorBasePtr &  _processor_ptr,
bool  _apply_loss_function,
const FactorTopology &  _top,
FactorStatus  _status = FAC_ACTIVE 
)
inline

Constructor of category FAC_FRAME.

◆ ~FactorRelativePosition2d()

wolf::FactorRelativePosition2d::~FactorRelativePosition2d ( )
overridedefault

Member Function Documentation

◆ evaluateJacobians() [1/2]

void wolf::FactorRelativePosition2d::evaluateJacobians ( const std::vector< Eigen::Map< const Eigen::VectorXd > > &  _st_vector,
std::vector< Eigen::Map< Eigen::MatrixRowXd > > &  jacobians,
const std::vector< bool > &  _compute_jacobian 
) const
inlineoverridevirtual

Returns the jacobians evaluated in the states provided.

Returns the jacobians evaluated in the states provided in std::vector of mapped Eigen::VectorXd. IMPORTANT: only fill the jacobians of the state blocks specified in _compute_jacobian.

Parameters
_st_vectoris a vector containing the mapped eigen vectors of all state blocks involved in the factor
jacobiansis an output vector of mapped eigen matrices that sould contain the jacobians w.r.t each state block
_compute_jacobianis a vector that specifies whether the ith jacobian sould be computed or not

Implements wolf::FactorAnalytic.

◆ evaluateJacobians() [2/2]

void wolf::FactorRelativePosition2d::evaluateJacobians ( const std::vector< Eigen::Map< const Eigen::VectorXd > > &  _st_vector,
std::vector< Eigen::MatrixXd > &  jacobians,
const std::vector< bool > &  _compute_jacobian 
) const
inlineoverridevirtual

Implements wolf::FactorAnalytic.

◆ evaluateResiduals()

Eigen::VectorXd wolf::FactorRelativePosition2d::evaluateResiduals ( const std::vector< Eigen::Map< const Eigen::VectorXd > > &  _st_vector) const
inlineoverridevirtual

Returns the residual evaluated in the states provided.

IMPLEMENTATION ///.

Returns the residual evaluated in the states provided in a std::vector of mapped Eigen::VectorXd

Implements wolf::FactorAnalytic.

◆ evaluateUnweightedJacobians()

void wolf::FactorRelativePosition2d::evaluateUnweightedJacobians ( std::vector< Eigen::MatrixXd > &  jacobians) const
inlineoverridevirtual

Returns the pure jacobians (without measurement noise) evaluated in the state blocks values.

Parameters
jacobiansis an output vector of mapped eigen matrices that sould contain the jacobians w.r.t each state block

Implements wolf::FactorAnalytic.

◆ getSize()

unsigned int wolf::FactorRelativePosition2d::getSize ( ) const
inlineoverridevirtual

Returns the factor residual size.

Implements wolf::FactorBase.


The documentation for this class was generated from the following file: